package by.blog.dao.beans;

import java.io.Serializable;

/**
 * Бондарчик Антон  15.11.2014.
 */
public class Film implements Serializable{

    private int film_id;
    private String film_name;
    private int category_id;
    private String user_name;

    public Film() {
    }

    public int getFilm_id() {
        return film_id;
    }

    public void setFilm_id(int film_id) {
        this.film_id = film_id;
    }

    public String getFilm_name() {
        return film_name;
    }

    public void setFilm_name(String film_name) {
        this.film_name = film_name;
    }

    public int getCategory_id() {
        return category_id;
    }

    public void setCategory_id(int category_id) {
        this.category_id = category_id;
    }

    public String getUser_name() {
        return user_name;
    }

    public void setUser_name(String user_name) {
        this.user_name = user_name;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof Film)) return false;

        Film film = (Film) o;

        if (category_id != film.category_id) return false;
        if (film_id != film.film_id) return false;
        if (!film_name.equals(film.film_name)) return false;
        if (!user_name.equals(film.user_name)) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = film_id;
        result = 31 * result + film_name.hashCode();
        result = 31 * result + category_id;
        result = 31 * result + user_name.hashCode();
        return result;
    }
}
